package com.lbssoft.gpsbd.service;

import com.lbssoft.gpsbd.model.Permission;
import com.lbssoft.gpsbd.model.Result;

import java.util.List;
import java.util.Set;

/**
 * Created by nczc on 2018/2/24.
 */

public interface PermissionService {
    List<Permission> getPermissionsByUid(long uid);

    List<Permission> getPermissionsByRoleId(int roleId);


    void add(Permission permis);

    List<Permission> list(int groupId);

    void delete(int id);

    Set<Integer> getPermissionIds(int roleId,String types);

    void update(Permission permis);

    List<Permission> getPermissionsByPid(int parentId);




    List<Permission> getMenusByRoleId(int roleId,int groupId);

    /**
     * 排序菜单权限
     * @param id
     * @param direction 方向 0向下 1向上
     */
    Result sort(int id, int direction);

}
